package com.ht.config.quartz.task;

import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.ht.config.quartz.DynamicClassJob;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.util.Map;

/**
 * 带参执行定时任务
 */
public class ParameterTask implements Job {


    @Override
    public void execute(JobExecutionContext context) {
        //获取参数
        String paramsStr = context.getJobDetail().getJobDataMap().getString("jobParams");
        System.out.println("执行 ParameterTask,参数" + paramsStr);
    }


}
